package com.duguo.dynamicmvc.factory.processor.model;

import java.util.Map;

import javassist.CtClass;
import javassist.CtMethod;

import com.duguo.dynamicmvc.factory.ControllerBuilder;
import com.duguo.dynamicmvc.factory.ControllerFactory;
import com.duguo.dynamicmvc.factory.utils.ChangeOnceBoolean;

public interface ModelBinder {

	public void addModelBindCode(CtClass controllerCtClass,
			StringBuffer methodBody, CtClass modelCtClass,
			CtMethod controllerMethod, String returnText,
			ChangeOnceBoolean hasValidationException, ControllerBuilder controllerBuilder) throws Exception;

	public void createBindMethod(ControllerFactory controllerFactory,
			CtClass modelImplCtClass, Map<String, CtClass> getters,
			Map<String, CtClass> setters, CtMethod controllerMethod,
			Map<String, Object> staticObjects,
			ModelAnnotationReader modelAnnotationReader,ModelFieldCreator modelFieldCreator) throws Exception;

}
